cddef7dbb25bd9c409c658f4f7142c190c0c239e,src/test/java/org/jboss/logmanager/handlers/SyslogHandlerTests.java,SyslogHandlerTests,testRFC5424Format,#,42
Before Change
@Test
public void testRFC5424Format() throws Exception {
final Calendar cal = getCalendar();
String formattedMessage = SyslogType.RFC5424.format(createRecord(cal, MSG), null, Facility.USER_LEVEL, "test", "1234", "java");
String expectedMessage = "<14>1 2012-01-09T04:39:22.000" + calculateTimeZone(cal) + " test java 1234 - - " + MSG;
Assert.assertEquals(expectedMessage, formattedMessage);
After Change
final Calendar cal = getCalendar();
// Create the record
handler.setHostname("test");
ExtLogRecord record = createRecord(cal, MSG);
String expectedMessage = "<14>1 2012-01-09T04:39:22.000" + calculateTimeZone(cal) + " test java " + handler.getPid() + " - - " + BOM + MSG + '\n';
handler.publish(record);
Assert.assertEquals(expectedMessage, out.toString());
// Create the record